package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListModel;

import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Vcompetencia extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JLabel lbljuez;
	private JLabel lblnadadores;
	private JScrollPane jScrollPane1;
	private JTable jTable1;
	private JRadioButton btnSexoM;
	private JRadioButton btnSexo;
	private JComboBox cmbmodalidad;
	private JButton btbgeneracomp;
	private JButton btnCargarn;
	private JTextField txtjuez;
	private JLabel lblmodalidad;
	private JTextField txthora;
	private JLabel lblhora;
	private JTextField txtfecha;
	private JLabel lblfecha;
	private JTextField txtcodigoc;
	private JLabel lblcodigo;

	/**
	* Auto-generated main method to display this JFrame
	*/
		
	public Vcompetencia() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, "Center");
				jPanel1.setLayout(null);
				jPanel1.setBounds(0, 0, 642, 309);
				{
					lblcodigo = new JLabel();
					jPanel1.add(lblcodigo);
					lblcodigo.setText("Codigo:");
					lblcodigo.setBounds(12, 24, 62, 16);
				}
				{
					txtcodigoc = new JTextField();
					jPanel1.add(txtcodigoc);
					txtcodigoc.setBounds(70, 21, 100, 22);
				}
				{
					lblfecha = new JLabel();
					jPanel1.add(lblfecha);
					lblfecha.setText("Fecha:");
					lblfecha.setBounds(13, 62, 69, 16);
				}
				{
					txtfecha = new JTextField();
					jPanel1.add(txtfecha);
					txtfecha.setBounds(74, 59, 120, 23);
				}
				{
					lblhora = new JLabel();
					jPanel1.add(lblhora);
					lblhora.setText("Hora:");
					lblhora.setBounds(220, 60, 50, 21);
				}
				{
					txthora = new JTextField();
					jPanel1.add(txthora);
					txthora.setBounds(262, 58, 76, 26);
				}
				{
					lblmodalidad = new JLabel();
					jPanel1.add(lblmodalidad);
					lblmodalidad.setText("Modalidad:");
					lblmodalidad.setBounds(12, 98, 102, 16);
				}
				{
					lbljuez = new JLabel();
					jPanel1.add(lbljuez);
					lbljuez.setText("Juez Principal:");
					lbljuez.setBounds(12, 140, 91, 16);
				}
				{
					txtjuez = new JTextField();
					jPanel1.add(txtjuez);
					txtjuez.setBounds(115, 137, 155, 23);
				}
				{
					lblnadadores = new JLabel();
					jPanel1.add(lblnadadores);
					lblnadadores.setText("Carriles:");
					lblnadadores.setBounds(12, 187, 57, 16);
				}
				{
					btbgeneracomp = new JButton();
					jPanel1.add(btbgeneracomp);
					btbgeneracomp.setText("Generar Competencia");
					btbgeneracomp.setBounds(254, 275, 129, 23);
				}
				{
					ComboBoxModel cmbmodalidadModel = 
						new DefaultComboBoxModel(
								new String[] { "Libre 50mtrs","Libre 100 mtrs", "Pecho 50mtrs","Pecho 100mtrs","Mariposa 50mtrs", "Mariposa 100mtrs","Espalda 50mtr", "Espalda 100mtrs"});
					cmbmodalidad = new JComboBox();
					jPanel1.add(cmbmodalidad);
					cmbmodalidad.setModel(cmbmodalidadModel);
					cmbmodalidad.setBounds(116, 95, 150, 23);
				}
				{
					btnSexo = new JRadioButton();
					jPanel1.add(btnSexo);
					btnSexo.setText("F");
					btnSexo.setBounds(278, 96, 56, 20);
				}
				{
					btnSexoM = new JRadioButton();
					jPanel1.add(btnSexoM);
					btnSexoM.setText("M");
					btnSexoM.setBounds(334, 96, 61, 20);
				}
				{
					btnCargarn = new JButton();
					jPanel1.add(btnCargarn);
					btnCargarn.setText("Cargar Nadadores");
					btnCargarn.setBounds(520, 184, 111, 23);
				}
				{
					jScrollPane1 = new JScrollPane();
					jPanel1.add(jScrollPane1);
					jScrollPane1.setBounds(81, 184, 418, 68);
					{
						TableModel jTable1Model = 
							new DefaultTableModel(
									new String[][] { { "One", "Two" }, { "Three", "Four" } },
									new String[] { "Column 1", "Column 2" });
						jTable1 = new JTable();
						jScrollPane1.setViewportView(jTable1);
						jTable1.setModel(jTable1Model);
					}
				}
			}
			pack();
			this.setSize(658, 359);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
public String getcodigoc(){
	return txtcodigoc.getText();
}
public String getfechac (){
	return txtfecha.getText();
}
public String gethora(){
	return txthora.getText();
}
public String getjuezp(){
	return txtjuez.getText();
}
public String getmodalidad(){
	return cmbmodalidad.getSelectedItem().toString();
}
	public void addListener(ActionListener action){
	btnSexo.addActionListener(action);
	btnSexoM.addActionListener(action); 
	}

	public void mensaje(String string) {
		JOptionPane.showMessageDialog(this, string);
		// TODO Auto-generated method stub
		
	}

	public void Limpiar() {
		// TODO Auto-generated method stub
		
	}
}

